﻿<UserControl x:Class="VMWareLabWorkflowsDataContracts.VMWareLabDetailsDialogControls.TestDetailsControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="500" Background="LightGray">
    <Grid Margin="12,12,12,12" VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <CheckBox Content="Run these tests in the environment" Grid.Row="0" Height="16" HorizontalAlignment="Left" Name="cbRunTest" VerticalAlignment="Top" IsChecked="{Binding TestDetails.RunTest}"/>
        <Grid IsEnabled="{Binding ElementName=cbRunTest, Path=IsChecked}" Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="0" HorizontalAlignment="Left" Name="textBlock1" Text="Select the test plan:" VerticalAlignment="Top" />
            <ComboBox Grid.Row="1" HorizontalAlignment="Left" Name="cbTestPlan" VerticalAlignment="Top" Width="415" DisplayMemberPath="Name" ItemsSource="{Binding TestPlans}" SelectionChanged="cbTestPlan_SelectionChanged" 
                      SelectedValuePath="Id" SelectedValue="{Binding TestDetails.TestPlanId}"/>

            <TextBlock Grid.Row="2" HorizontalAlignment="Left" Name="textBlock2" Text="Select the test suites:" VerticalAlignment="Top" Margin="0,5,0,0"/>
            <StackPanel Orientation="Horizontal" Grid.Row="3">
                <TextBox HorizontalAlignment="Left" Name="tbTestSuites" VerticalAlignment="Top" Width="415" IsReadOnly="True" Text="{Binding SelectedTestSuites}"/>
                <Button Content="..." Height="23" HorizontalAlignment="Left" Name="btnSelectSuite" VerticalAlignment="Top" Width="30" Margin="3,0,0,0" Command="{Binding OpenSelectTestSuites}"/>
            </StackPanel>
            <TextBlock Grid.Row="4" HorizontalAlignment="Left" Name="textBlock3" Text="Select the test configuration:" VerticalAlignment="Top" Margin="0,5,0,0"/>
            <ComboBox Grid.Row="5" HorizontalAlignment="Left" Name="cbTestConfiguration" VerticalAlignment="Top" Width="415" DisplayMemberPath="Name" 
                      ItemsSource="{Binding TestConfigurations}" SelectionChanged="cbTestConfiguration_SelectionChanged"
                      SelectedValuePath="Id" SelectedValue="{Binding TestDetails.TestConfigurationId}"/>

            <TextBlock Grid.Row="6" HorizontalAlignment="Left" Name="textBlock4" Text="Select the automated test settings:" VerticalAlignment="Top" Margin="0,5,0,0"/>
            <ComboBox Grid.Row="7" HorizontalAlignment="Left" Name="cbTestSettings" VerticalAlignment="Top" Width="415" ItemsSource="{Binding TestSettings}" DisplayMemberPath="Name" SelectedValuePath="Id" SelectedValue="{Binding TestDetails.TestSettingsId}"/>

            <TextBlock Grid.Row="8" HorizontalAlignment="Left" Name="textBlock5" Text="Select the environment:" VerticalAlignment="Top" Margin="0,5,0,0"/>
            <ComboBox Grid.Row="9" HorizontalAlignment="Left" Name="cbTestEnvironment" VerticalAlignment="Top" Width="415" ItemsSource="{Binding TestEnvironments}" DisplayMemberPath="Name" SelectedValuePath="Name" SelectedValue="{Binding EnvironmentDetails.TestEnvironmentName}"/>
        </Grid>

        <CheckBox Content="Run automated tests" Grid.Row="2" HorizontalAlignment="Left" Name="cbAutomatedTests" VerticalAlignment="Top" IsChecked="{Binding AutomatedTestSettings.RunAutomatedTests}" Margin="0 20 0 10"/>
        <Grid Grid.Row="3" IsEnabled="{Binding ElementName=cbAutomatedTests, Path=IsChecked}">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="0" HorizontalAlignment="Left" Name="textBlock6" Text="Select automated tests:" VerticalAlignment="Top" Margin="0,5,0,0"/>
            <StackPanel Orientation="Horizontal" Grid.Row="1">
                <TextBox Name="tbAutomatedTests" Width="415" Text="{Binding TestSpecString}" IsReadOnly="True"/>
                <Button Content="..." Height="23" HorizontalAlignment="Left" Name="btnSelectAutomatedTests" VerticalAlignment="Top" Width="30" Margin="3,0,0,0" Command="{Binding SelectAutomatedTests}"/>
            </StackPanel>
            <TextBlock Grid.Row="2" HorizontalAlignment="Left" Name="textBlock7" Text="GetVersion:" VerticalAlignment="Top" Margin="0,5,0,0"/>
            <TextBox Grid.Row="3" HorizontalAlignment="Left" Name="tbGetVersion" VerticalAlignment="Top" Width="415" Text="{Binding AutomatedTestSettings.GetVersion}"/>
            <TextBlock Grid.Row="4" HorizontalAlignment="Left" Name="textBlock8" Text="Build deploy folder:" VerticalAlignment="Top" Margin="0,5,0,0"/>
            <TextBox Grid.Row="5" HorizontalAlignment="Left" Name="tbBuildDeployFolder" VerticalAlignment="Top" Width="415" Text="{Binding AutomatedTestSettings.BuildDeployFolder}"/>
        </Grid>

    </Grid>
</UserControl>
